#ifndef JOINTIMAGE_H
#define JOINTIMAGE_H
#include <QObject>
#include <QImage>
#include <QProcess>
#include <QFileInfo>
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/operations.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdlib.h>
class jointImage : public QObject
{
    Q_OBJECT
public:
    explicit jointImage(QObject *parent = nullptr);
signals:
public slots:
public: // 第一部分
    void getTowerLines(QString szDirPath, QString szPic, std::string filename);
    int getPicTowerPart(std::string szPic, std::string filename);
    int FindContours(cv::Mat &src, std::vector< std::vector<cv::Point>> &contours, std::vector<cv::Vec4i> &hierarchy,
                     int retr, int method, cv::Point offset);
    double getDistance(CvPoint pointO, CvPoint pointA);
    std::vector<cv::Vec4i> getMergeLines(std::vector<cv::Vec4i> &savedLines, std::vector<double> &linesAngle);
    std::vector<std::vector<cv::Point2f>> getTreePoints()
    {
        return pointsF;
    }
// 数据成员
    cv::Mat m_src;
    std::string resultImg1;
    std::vector<std::vector<cv::Point2f>> pointsF;
    int idx = 0;

    QString m_resultImageDir;
    QString m_srcImagePath;
    QImage* mp_srcImg;
};
#endif // JOINTIMAGE_H


